<template>
	<view>
		<view v-for="(item,index) in shuju" :key="index">
			<view class="wenzi">
				<view class="time">
					{{item.title}}
				</view>
				<view class="wenzizi">
					<text>发表时间&nbsp;&nbsp;{{item.add_time|formatDate}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;浏览&nbsp;&nbsp;{{item.click}}</text>.
				</view>
				<view class="text">
					<rich-text :nodes="item.content"></rich-text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: -1,
				shuju:[]
			}
		},
		methods: {
			async getshuju() {
				// goods/getinfo/:id
				// /getnew/:newid
				const data = await uni.$Http.get(`getnew/${this.id}`)
				console.log(data)
				this.shuju = data.message
			},
		},
		onLoad(e) {
			console.log(e)
			this.id = e.id
			this.getshuju()
		}
	}
</script>

<style>
.tupian{
	height: 180rpx;
	width: 320rpx;
}
.tupian image{
	width: 220rpx;
	height: 180rpx;
}
.time{
	font-weight: bold;
	font-size: 34rpx;
}
.wenzi{
	font-size: 32rpx;
}
.da{
	border-bottom: 2px solid #C0352C;
	display: flex;
	margin-bottom: 10rpx;
	/* margin-top: 10px; */
}
</style>
